home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
comm1
/
npns.lha
/
npns
/
NewPostNewsSpool.doc
next >
Wrap
Text File
|
1996-04-20
|
6KB
|
199 lines
New Post News Spool v4.2
by
Nick d'Alterio
April 1996
Introduction
-------------
A while back I was looking for a way of spooling news so that I could
write articles offline and then send them when I went online. I found
the a set of programs to do this in PostNewsSpool by James Burton.
However I found that there were a number of problems with postnews
and sendnews such as:-
The check to see if online took far too long
Locks were often left on the spool dir
Lots of unnecessary files were produced
If news posting fails for some reason the message was lost
These versions have eliminated these problems and added a couple
of extra features.
Installation
------------
Copy sendnews and postnews to somewhere on your path and set the
appropriate environment variable described below.
postnews should be the program that is called by your news reading
program to post the news. This will spool the article so that you
can use sendnews to send it off when you go online.
Although it is possible to use to spool news without the rest of the
package I recommend that you get the complete postnewsspool archive
by James Burton.
Updating
--------
Note that from version 3 sendnews will attempt to send any article
in the spooldir no matter what the name is. So if your news reader
produces a fully formed news article with header you can drop it
straight into the spooldir without using postnews.
You should remove the seq file if you had it in your spooldir and
the env variable PNS_SEQFILE
If updating from version 3.x to 4.x note that the postnews argument -from has
now changed to -f.
Online Check
------------
Since version 4.2 npns uses an enviroment variable ONLINE to determine
if the machine is online or not. If this variable is set to 0 then
you are assumed to be offline anything else indicates you are online.
If this variable does not exist then both postnews and sendnews assume
that you are offline.
This variable should be setup in the startnet and stopnet scripts for
best use.
Sendnews
--------
Simply run the program and it will send off all messages in the
spool directory indicated by the environment variable PNS_SPOOLDIR
(AmiTCP:Usr/Spool/News by default).
The news articles will be posted using the program specified in
PNS_NNTPPOST (AmiTCP:bin/NNTPPost by default ). If the posting program
fails to post the article the article will then be appended to the
end of the failed archive indicated by PNS_FAILED_ARC
( AmiTCP:Usr/Spool/sendnews.failed by default ). Each file in the
failed archive will be separated by a line containing the date and time
sendnews failed to post the article.
Remember that NNTPPost requires that the environment variable NNTPSERVER
is set.
Postnews
--------
This spools a news article ready for posting when online. The article can
be complete with header (as prepared by tin) or in its component parts, in which
case postnews puts them together so that the article is ready for posting (Grn style).
It places the article in the spool directory PNS_SPOOLDIR (AmiTCP:Usr/Spool/News by default).
The spooled filename has the format msg.######### where ###### is a
number which refers to the time of writing.
If online at the time of writing the article then postnews immediately
executes sendnews (which must be in AmiTCP:bin/) to send off the article.
To stop postnews from sending the article create an enviroment variable
called PNS_OFFLINE.
The order of the command line options below is not important. However if the
option -R or the article is specified more than once then the last occurence
will be used.
Command line options:-
-f "someone@somewhere" Add a from line to the header of
article.
-n Don't call sendnews if online
(equivalent to PNS_OFFLINE)
-R filename Get the article header from the specified
file.
-x filename Delete file if posting is a success.
-h Prints some help
If the parameter for options f, R and x is skipped then the program will print an error
message and exit. (The exception here is if the parameter is skipped and the article
name is the next thing on the command line).
The option -x can appear up to 16 times on the command line after which any additional
usage will be ignored. (This isn't a delete program!!!)
Usage Examples
--------------
postnews article Spools fully formed article
postnews < article Spools fully formed article from stdin
postnews article -x article Spools article then deletes original
postnews body -R header Spools article made from header and body
postnews body -R header -x header -x body As above but deletes the original files
e.g. For tin I use
set TIN_POST amitcp:bin/postnews -f "nagd@doc.ic.ac.uk (Nicholas d'Alterio)" %s
for Grn try
amitcp:bin/postnews .artcle -R .header -x .article -x .header
History
-------
4.2 - Various bugs in online check (schlonz@xantilon.ame.osn.de)
Online check system redesigned, should work for any system now.
- Remove -a option. No longer had any purpose.
- Doesn't bother with DOS library opening anymore (let SAS handle this)
- sendnews can now appear anywhere on the path instead of amitcp:bin
4.1 - Postnews - New command line options -R, -x (for Grn users), -a
- Postnews - Changed check for onlineness
- Postnews - Improved command line checks
3.2 - New enviroment variable PNS_OFFLINE
3.1 - Now uses ADOS functions
- seq file no longer needed
- ANY file in the spooldir will be sent
- the failed archive entries are separated by a line
containing the time the file failed.
- new env variable PNS_NNTPPOST allows user to specify
program to post news
2.1 - Added support for environment variables
1.x - Internal test versions
Conditions of Use
-----------------
Use it how you like just remember I accept NO liability for
ANYTHING that happens.
Let me know of what you think of it, bugs, etc
Thanks
------
Thanks to James Burton for the original idea and code.
Jeroen T Vermeulen for some new ideas.
ToDo
----
Make sendnews a full NNTP posting client (AmiTCP)
------------------------------------------------------------------------------------
Nick d'Alterio (nagd@doc.ic.ac.uk)
$Id: NewPostNewsSpool.doc 1.7 1996/04/20 13:33:24 nagd Exp $